/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
"use strict";

var $protobuf = require("protobufjs/minimal");

// Common aliases
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;

// Exported root namespace
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});

$root.proto = (function() {

    /**
     * Namespace proto.
     * @exports proto
     * @namespace
     */
    var proto = {};

    proto.Player = (function() {

        /**
         * Properties of a Player.
         * @memberof proto
         * @interface IPlayer
         * @property {string|null} [id] Player id
         * @property {string|null} [name] Player name
         * @property {string|null} [head] Player head
         * @property {number|Long|null} [playerExp] Player playerExp
         * @property {number|Long|null} [playerLevel] Player playerLevel
         * @property {number|Long|null} [weaponLevel] Player weaponLevel
         * @property {number|Long|null} [weaponExp] Player weaponExp
         */

        /**
         * Constructs a new Player.
         * @memberof proto
         * @classdesc Represents a Player.
         * @implements IPlayer
         * @constructor
         * @param {proto.IPlayer=} [properties] Properties to set
         */
        function Player(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * Player id.
         * @member {string} id
         * @memberof proto.Player
         * @instance
         */
        Player.prototype.id = "";

        /**
         * Player name.
         * @member {string} name
         * @memberof proto.Player
         * @instance
         */
        Player.prototype.name = "";

        /**
         * Player head.
         * @member {string} head
         * @memberof proto.Player
         * @instance
         */
        Player.prototype.head = "";

        /**
         * Player playerExp.
         * @member {number|Long} playerExp
         * @memberof proto.Player
         * @instance
         */
        Player.prototype.playerExp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * Player playerLevel.
         * @member {number|Long} playerLevel
         * @memberof proto.Player
         * @instance
         */
        Player.prototype.playerLevel = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * Player weaponLevel.
         * @member {number|Long} weaponLevel
         * @memberof proto.Player
         * @instance
         */
        Player.prototype.weaponLevel = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * Player weaponExp.
         * @member {number|Long} weaponExp
         * @memberof proto.Player
         * @instance
         */
        Player.prototype.weaponExp = $util.Long ? $util.Long.fromBits(0,0,true) : 0;

        /**
         * Creates a new Player instance using the specified properties.
         * @function create
         * @memberof proto.Player
         * @static
         * @param {proto.IPlayer=} [properties] Properties to set
         * @returns {proto.Player} Player instance
         */
        Player.create = function create(properties) {
            return new Player(properties);
        };

        /**
         * Encodes the specified Player message. Does not implicitly {@link proto.Player.verify|verify} messages.
         * @function encode
         * @memberof proto.Player
         * @static
         * @param {proto.IPlayer} message Player message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Player.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.id != null && Object.hasOwnProperty.call(message, "id"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.id);
            if (message.name != null && Object.hasOwnProperty.call(message, "name"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.name);
            if (message.head != null && Object.hasOwnProperty.call(message, "head"))
                writer.uint32(/* id 3, wireType 2 =*/26).string(message.head);
            if (message.playerExp != null && Object.hasOwnProperty.call(message, "playerExp"))
                writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.playerExp);
            if (message.playerLevel != null && Object.hasOwnProperty.call(message, "playerLevel"))
                writer.uint32(/* id 5, wireType 0 =*/40).uint64(message.playerLevel);
            if (message.weaponLevel != null && Object.hasOwnProperty.call(message, "weaponLevel"))
                writer.uint32(/* id 6, wireType 0 =*/48).uint64(message.weaponLevel);
            if (message.weaponExp != null && Object.hasOwnProperty.call(message, "weaponExp"))
                writer.uint32(/* id 7, wireType 0 =*/56).uint64(message.weaponExp);
            return writer;
        };

        /**
         * Encodes the specified Player message, length delimited. Does not implicitly {@link proto.Player.verify|verify} messages.
         * @function encodeDelimited
         * @memberof proto.Player
         * @static
         * @param {proto.IPlayer} message Player message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        Player.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a Player message from the specified reader or buffer.
         * @function decode
         * @memberof proto.Player
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {proto.Player} Player
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Player.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.Player();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.id = reader.string();
                    break;
                case 2:
                    message.name = reader.string();
                    break;
                case 3:
                    message.head = reader.string();
                    break;
                case 4:
                    message.playerExp = reader.uint64();
                    break;
                case 5:
                    message.playerLevel = reader.uint64();
                    break;
                case 6:
                    message.weaponLevel = reader.uint64();
                    break;
                case 7:
                    message.weaponExp = reader.uint64();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a Player message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof proto.Player
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {proto.Player} Player
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        Player.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a Player message.
         * @function verify
         * @memberof proto.Player
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        Player.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.id != null && message.hasOwnProperty("id"))
                if (!$util.isString(message.id))
                    return "id: string expected";
            if (message.name != null && message.hasOwnProperty("name"))
                if (!$util.isString(message.name))
                    return "name: string expected";
            if (message.head != null && message.hasOwnProperty("head"))
                if (!$util.isString(message.head))
                    return "head: string expected";
            if (message.playerExp != null && message.hasOwnProperty("playerExp"))
                if (!$util.isInteger(message.playerExp) && !(message.playerExp && $util.isInteger(message.playerExp.low) && $util.isInteger(message.playerExp.high)))
                    return "playerExp: integer|Long expected";
            if (message.playerLevel != null && message.hasOwnProperty("playerLevel"))
                if (!$util.isInteger(message.playerLevel) && !(message.playerLevel && $util.isInteger(message.playerLevel.low) && $util.isInteger(message.playerLevel.high)))
                    return "playerLevel: integer|Long expected";
            if (message.weaponLevel != null && message.hasOwnProperty("weaponLevel"))
                if (!$util.isInteger(message.weaponLevel) && !(message.weaponLevel && $util.isInteger(message.weaponLevel.low) && $util.isInteger(message.weaponLevel.high)))
                    return "weaponLevel: integer|Long expected";
            if (message.weaponExp != null && message.hasOwnProperty("weaponExp"))
                if (!$util.isInteger(message.weaponExp) && !(message.weaponExp && $util.isInteger(message.weaponExp.low) && $util.isInteger(message.weaponExp.high)))
                    return "weaponExp: integer|Long expected";
            return null;
        };

        /**
         * Creates a Player message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof proto.Player
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {proto.Player} Player
         */
        Player.fromObject = function fromObject(object) {
            if (object instanceof $root.proto.Player)
                return object;
            var message = new $root.proto.Player();
            if (object.id != null)
                message.id = String(object.id);
            if (object.name != null)
                message.name = String(object.name);
            if (object.head != null)
                message.head = String(object.head);
            if (object.playerExp != null)
                if ($util.Long)
                    (message.playerExp = $util.Long.fromValue(object.playerExp)).unsigned = true;
                else if (typeof object.playerExp === "string")
                    message.playerExp = parseInt(object.playerExp, 10);
                else if (typeof object.playerExp === "number")
                    message.playerExp = object.playerExp;
                else if (typeof object.playerExp === "object")
                    message.playerExp = new $util.LongBits(object.playerExp.low >>> 0, object.playerExp.high >>> 0).toNumber(true);
            if (object.playerLevel != null)
                if ($util.Long)
                    (message.playerLevel = $util.Long.fromValue(object.playerLevel)).unsigned = true;
                else if (typeof object.playerLevel === "string")
                    message.playerLevel = parseInt(object.playerLevel, 10);
                else if (typeof object.playerLevel === "number")
                    message.playerLevel = object.playerLevel;
                else if (typeof object.playerLevel === "object")
                    message.playerLevel = new $util.LongBits(object.playerLevel.low >>> 0, object.playerLevel.high >>> 0).toNumber(true);
            if (object.weaponLevel != null)
                if ($util.Long)
                    (message.weaponLevel = $util.Long.fromValue(object.weaponLevel)).unsigned = true;
                else if (typeof object.weaponLevel === "string")
                    message.weaponLevel = parseInt(object.weaponLevel, 10);
                else if (typeof object.weaponLevel === "number")
                    message.weaponLevel = object.weaponLevel;
                else if (typeof object.weaponLevel === "object")
                    message.weaponLevel = new $util.LongBits(object.weaponLevel.low >>> 0, object.weaponLevel.high >>> 0).toNumber(true);
            if (object.weaponExp != null)
                if ($util.Long)
                    (message.weaponExp = $util.Long.fromValue(object.weaponExp)).unsigned = true;
                else if (typeof object.weaponExp === "string")
                    message.weaponExp = parseInt(object.weaponExp, 10);
                else if (typeof object.weaponExp === "number")
                    message.weaponExp = object.weaponExp;
                else if (typeof object.weaponExp === "object")
                    message.weaponExp = new $util.LongBits(object.weaponExp.low >>> 0, object.weaponExp.high >>> 0).toNumber(true);
            return message;
        };

        /**
         * Creates a plain object from a Player message. Also converts values to other types if specified.
         * @function toObject
         * @memberof proto.Player
         * @static
         * @param {proto.Player} message Player
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        Player.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                object.id = "";
                object.name = "";
                object.head = "";
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.playerExp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.playerExp = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.playerLevel = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.playerLevel = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.weaponLevel = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.weaponLevel = options.longs === String ? "0" : 0;
                if ($util.Long) {
                    var long = new $util.Long(0, 0, true);
                    object.weaponExp = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.weaponExp = options.longs === String ? "0" : 0;
            }
            if (message.id != null && message.hasOwnProperty("id"))
                object.id = message.id;
            if (message.name != null && message.hasOwnProperty("name"))
                object.name = message.name;
            if (message.head != null && message.hasOwnProperty("head"))
                object.head = message.head;
            if (message.playerExp != null && message.hasOwnProperty("playerExp"))
                if (typeof message.playerExp === "number")
                    object.playerExp = options.longs === String ? String(message.playerExp) : message.playerExp;
                else
                    object.playerExp = options.longs === String ? $util.Long.prototype.toString.call(message.playerExp) : options.longs === Number ? new $util.LongBits(message.playerExp.low >>> 0, message.playerExp.high >>> 0).toNumber(true) : message.playerExp;
            if (message.playerLevel != null && message.hasOwnProperty("playerLevel"))
                if (typeof message.playerLevel === "number")
                    object.playerLevel = options.longs === String ? String(message.playerLevel) : message.playerLevel;
                else
                    object.playerLevel = options.longs === String ? $util.Long.prototype.toString.call(message.playerLevel) : options.longs === Number ? new $util.LongBits(message.playerLevel.low >>> 0, message.playerLevel.high >>> 0).toNumber(true) : message.playerLevel;
            if (message.weaponLevel != null && message.hasOwnProperty("weaponLevel"))
                if (typeof message.weaponLevel === "number")
                    object.weaponLevel = options.longs === String ? String(message.weaponLevel) : message.weaponLevel;
                else
                    object.weaponLevel = options.longs === String ? $util.Long.prototype.toString.call(message.weaponLevel) : options.longs === Number ? new $util.LongBits(message.weaponLevel.low >>> 0, message.weaponLevel.high >>> 0).toNumber(true) : message.weaponLevel;
            if (message.weaponExp != null && message.hasOwnProperty("weaponExp"))
                if (typeof message.weaponExp === "number")
                    object.weaponExp = options.longs === String ? String(message.weaponExp) : message.weaponExp;
                else
                    object.weaponExp = options.longs === String ? $util.Long.prototype.toString.call(message.weaponExp) : options.longs === Number ? new $util.LongBits(message.weaponExp.low >>> 0, message.weaponExp.high >>> 0).toNumber(true) : message.weaponExp;
            return object;
        };

        /**
         * Converts this Player to JSON.
         * @function toJSON
         * @memberof proto.Player
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        Player.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return Player;
    })();

    proto.GetPlayerRequest = (function() {

        /**
         * Properties of a GetPlayerRequest.
         * @memberof proto
         * @interface IGetPlayerRequest
         * @property {string|null} [playerId] GetPlayerRequest playerId
         */

        /**
         * Constructs a new GetPlayerRequest.
         * @memberof proto
         * @classdesc Represents a GetPlayerRequest.
         * @implements IGetPlayerRequest
         * @constructor
         * @param {proto.IGetPlayerRequest=} [properties] Properties to set
         */
        function GetPlayerRequest(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * GetPlayerRequest playerId.
         * @member {string} playerId
         * @memberof proto.GetPlayerRequest
         * @instance
         */
        GetPlayerRequest.prototype.playerId = "";

        /**
         * Creates a new GetPlayerRequest instance using the specified properties.
         * @function create
         * @memberof proto.GetPlayerRequest
         * @static
         * @param {proto.IGetPlayerRequest=} [properties] Properties to set
         * @returns {proto.GetPlayerRequest} GetPlayerRequest instance
         */
        GetPlayerRequest.create = function create(properties) {
            return new GetPlayerRequest(properties);
        };

        /**
         * Encodes the specified GetPlayerRequest message. Does not implicitly {@link proto.GetPlayerRequest.verify|verify} messages.
         * @function encode
         * @memberof proto.GetPlayerRequest
         * @static
         * @param {proto.IGetPlayerRequest} message GetPlayerRequest message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        GetPlayerRequest.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.playerId != null && Object.hasOwnProperty.call(message, "playerId"))
                writer.uint32(/* id 1, wireType 2 =*/10).string(message.playerId);
            return writer;
        };

        /**
         * Encodes the specified GetPlayerRequest message, length delimited. Does not implicitly {@link proto.GetPlayerRequest.verify|verify} messages.
         * @function encodeDelimited
         * @memberof proto.GetPlayerRequest
         * @static
         * @param {proto.IGetPlayerRequest} message GetPlayerRequest message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        GetPlayerRequest.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a GetPlayerRequest message from the specified reader or buffer.
         * @function decode
         * @memberof proto.GetPlayerRequest
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {proto.GetPlayerRequest} GetPlayerRequest
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        GetPlayerRequest.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.GetPlayerRequest();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.playerId = reader.string();
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a GetPlayerRequest message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof proto.GetPlayerRequest
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {proto.GetPlayerRequest} GetPlayerRequest
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        GetPlayerRequest.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a GetPlayerRequest message.
         * @function verify
         * @memberof proto.GetPlayerRequest
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        GetPlayerRequest.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.playerId != null && message.hasOwnProperty("playerId"))
                if (!$util.isString(message.playerId))
                    return "playerId: string expected";
            return null;
        };

        /**
         * Creates a GetPlayerRequest message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof proto.GetPlayerRequest
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {proto.GetPlayerRequest} GetPlayerRequest
         */
        GetPlayerRequest.fromObject = function fromObject(object) {
            if (object instanceof $root.proto.GetPlayerRequest)
                return object;
            var message = new $root.proto.GetPlayerRequest();
            if (object.playerId != null)
                message.playerId = String(object.playerId);
            return message;
        };

        /**
         * Creates a plain object from a GetPlayerRequest message. Also converts values to other types if specified.
         * @function toObject
         * @memberof proto.GetPlayerRequest
         * @static
         * @param {proto.GetPlayerRequest} message GetPlayerRequest
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        GetPlayerRequest.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults)
                object.playerId = "";
            if (message.playerId != null && message.hasOwnProperty("playerId"))
                object.playerId = message.playerId;
            return object;
        };

        /**
         * Converts this GetPlayerRequest to JSON.
         * @function toJSON
         * @memberof proto.GetPlayerRequest
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        GetPlayerRequest.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return GetPlayerRequest;
    })();

    proto.GetPlayerResponse = (function() {

        /**
         * Properties of a GetPlayerResponse.
         * @memberof proto
         * @interface IGetPlayerResponse
         * @property {number|Long|null} [code] GetPlayerResponse code
         * @property {string|null} [info] GetPlayerResponse info
         * @property {proto.GetPlayerResponse.IData|null} [data] GetPlayerResponse data
         */

        /**
         * Constructs a new GetPlayerResponse.
         * @memberof proto
         * @classdesc Represents a GetPlayerResponse.
         * @implements IGetPlayerResponse
         * @constructor
         * @param {proto.IGetPlayerResponse=} [properties] Properties to set
         */
        function GetPlayerResponse(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * GetPlayerResponse code.
         * @member {number|Long} code
         * @memberof proto.GetPlayerResponse
         * @instance
         */
        GetPlayerResponse.prototype.code = $util.Long ? $util.Long.fromBits(0,0,false) : 0;

        /**
         * GetPlayerResponse info.
         * @member {string} info
         * @memberof proto.GetPlayerResponse
         * @instance
         */
        GetPlayerResponse.prototype.info = "";

        /**
         * GetPlayerResponse data.
         * @member {proto.GetPlayerResponse.IData|null|undefined} data
         * @memberof proto.GetPlayerResponse
         * @instance
         */
        GetPlayerResponse.prototype.data = null;

        /**
         * Creates a new GetPlayerResponse instance using the specified properties.
         * @function create
         * @memberof proto.GetPlayerResponse
         * @static
         * @param {proto.IGetPlayerResponse=} [properties] Properties to set
         * @returns {proto.GetPlayerResponse} GetPlayerResponse instance
         */
        GetPlayerResponse.create = function create(properties) {
            return new GetPlayerResponse(properties);
        };

        /**
         * Encodes the specified GetPlayerResponse message. Does not implicitly {@link proto.GetPlayerResponse.verify|verify} messages.
         * @function encode
         * @memberof proto.GetPlayerResponse
         * @static
         * @param {proto.IGetPlayerResponse} message GetPlayerResponse message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        GetPlayerResponse.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.code != null && Object.hasOwnProperty.call(message, "code"))
                writer.uint32(/* id 1, wireType 0 =*/8).sint64(message.code);
            if (message.info != null && Object.hasOwnProperty.call(message, "info"))
                writer.uint32(/* id 2, wireType 2 =*/18).string(message.info);
            if (message.data != null && Object.hasOwnProperty.call(message, "data"))
                $root.proto.GetPlayerResponse.Data.encode(message.data, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified GetPlayerResponse message, length delimited. Does not implicitly {@link proto.GetPlayerResponse.verify|verify} messages.
         * @function encodeDelimited
         * @memberof proto.GetPlayerResponse
         * @static
         * @param {proto.IGetPlayerResponse} message GetPlayerResponse message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        GetPlayerResponse.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a GetPlayerResponse message from the specified reader or buffer.
         * @function decode
         * @memberof proto.GetPlayerResponse
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {proto.GetPlayerResponse} GetPlayerResponse
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        GetPlayerResponse.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.GetPlayerResponse();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.code = reader.sint64();
                    break;
                case 2:
                    message.info = reader.string();
                    break;
                case 3:
                    message.data = $root.proto.GetPlayerResponse.Data.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a GetPlayerResponse message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof proto.GetPlayerResponse
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {proto.GetPlayerResponse} GetPlayerResponse
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        GetPlayerResponse.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a GetPlayerResponse message.
         * @function verify
         * @memberof proto.GetPlayerResponse
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        GetPlayerResponse.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.code != null && message.hasOwnProperty("code"))
                if (!$util.isInteger(message.code) && !(message.code && $util.isInteger(message.code.low) && $util.isInteger(message.code.high)))
                    return "code: integer|Long expected";
            if (message.info != null && message.hasOwnProperty("info"))
                if (!$util.isString(message.info))
                    return "info: string expected";
            if (message.data != null && message.hasOwnProperty("data")) {
                var error = $root.proto.GetPlayerResponse.Data.verify(message.data);
                if (error)
                    return "data." + error;
            }
            return null;
        };

        /**
         * Creates a GetPlayerResponse message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof proto.GetPlayerResponse
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {proto.GetPlayerResponse} GetPlayerResponse
         */
        GetPlayerResponse.fromObject = function fromObject(object) {
            if (object instanceof $root.proto.GetPlayerResponse)
                return object;
            var message = new $root.proto.GetPlayerResponse();
            if (object.code != null)
                if ($util.Long)
                    (message.code = $util.Long.fromValue(object.code)).unsigned = false;
                else if (typeof object.code === "string")
                    message.code = parseInt(object.code, 10);
                else if (typeof object.code === "number")
                    message.code = object.code;
                else if (typeof object.code === "object")
                    message.code = new $util.LongBits(object.code.low >>> 0, object.code.high >>> 0).toNumber();
            if (object.info != null)
                message.info = String(object.info);
            if (object.data != null) {
                if (typeof object.data !== "object")
                    throw TypeError(".proto.GetPlayerResponse.data: object expected");
                message.data = $root.proto.GetPlayerResponse.Data.fromObject(object.data);
            }
            return message;
        };

        /**
         * Creates a plain object from a GetPlayerResponse message. Also converts values to other types if specified.
         * @function toObject
         * @memberof proto.GetPlayerResponse
         * @static
         * @param {proto.GetPlayerResponse} message GetPlayerResponse
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        GetPlayerResponse.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults) {
                if ($util.Long) {
                    var long = new $util.Long(0, 0, false);
                    object.code = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
                } else
                    object.code = options.longs === String ? "0" : 0;
                object.info = "";
                object.data = null;
            }
            if (message.code != null && message.hasOwnProperty("code"))
                if (typeof message.code === "number")
                    object.code = options.longs === String ? String(message.code) : message.code;
                else
                    object.code = options.longs === String ? $util.Long.prototype.toString.call(message.code) : options.longs === Number ? new $util.LongBits(message.code.low >>> 0, message.code.high >>> 0).toNumber() : message.code;
            if (message.info != null && message.hasOwnProperty("info"))
                object.info = message.info;
            if (message.data != null && message.hasOwnProperty("data"))
                object.data = $root.proto.GetPlayerResponse.Data.toObject(message.data, options);
            return object;
        };

        /**
         * Converts this GetPlayerResponse to JSON.
         * @function toJSON
         * @memberof proto.GetPlayerResponse
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        GetPlayerResponse.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        GetPlayerResponse.Data = (function() {

            /**
             * Properties of a Data.
             * @memberof proto.GetPlayerResponse
             * @interface IData
             * @property {proto.IPlayer|null} [player] Data player
             * @property {boolean|null} [Exist] Data Exist
             */

            /**
             * Constructs a new Data.
             * @memberof proto.GetPlayerResponse
             * @classdesc Represents a Data.
             * @implements IData
             * @constructor
             * @param {proto.GetPlayerResponse.IData=} [properties] Properties to set
             */
            function Data(properties) {
                if (properties)
                    for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                        if (properties[keys[i]] != null)
                            this[keys[i]] = properties[keys[i]];
            }

            /**
             * Data player.
             * @member {proto.IPlayer|null|undefined} player
             * @memberof proto.GetPlayerResponse.Data
             * @instance
             */
            Data.prototype.player = null;

            /**
             * Data Exist.
             * @member {boolean} Exist
             * @memberof proto.GetPlayerResponse.Data
             * @instance
             */
            Data.prototype.Exist = false;

            /**
             * Creates a new Data instance using the specified properties.
             * @function create
             * @memberof proto.GetPlayerResponse.Data
             * @static
             * @param {proto.GetPlayerResponse.IData=} [properties] Properties to set
             * @returns {proto.GetPlayerResponse.Data} Data instance
             */
            Data.create = function create(properties) {
                return new Data(properties);
            };

            /**
             * Encodes the specified Data message. Does not implicitly {@link proto.GetPlayerResponse.Data.verify|verify} messages.
             * @function encode
             * @memberof proto.GetPlayerResponse.Data
             * @static
             * @param {proto.GetPlayerResponse.IData} message Data message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Data.encode = function encode(message, writer) {
                if (!writer)
                    writer = $Writer.create();
                if (message.player != null && Object.hasOwnProperty.call(message, "player"))
                    $root.proto.Player.encode(message.player, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
                if (message.Exist != null && Object.hasOwnProperty.call(message, "Exist"))
                    writer.uint32(/* id 2, wireType 0 =*/16).bool(message.Exist);
                return writer;
            };

            /**
             * Encodes the specified Data message, length delimited. Does not implicitly {@link proto.GetPlayerResponse.Data.verify|verify} messages.
             * @function encodeDelimited
             * @memberof proto.GetPlayerResponse.Data
             * @static
             * @param {proto.GetPlayerResponse.IData} message Data message or plain object to encode
             * @param {$protobuf.Writer} [writer] Writer to encode to
             * @returns {$protobuf.Writer} Writer
             */
            Data.encodeDelimited = function encodeDelimited(message, writer) {
                return this.encode(message, writer).ldelim();
            };

            /**
             * Decodes a Data message from the specified reader or buffer.
             * @function decode
             * @memberof proto.GetPlayerResponse.Data
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @param {number} [length] Message length if known beforehand
             * @returns {proto.GetPlayerResponse.Data} Data
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Data.decode = function decode(reader, length) {
                if (!(reader instanceof $Reader))
                    reader = $Reader.create(reader);
                var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.GetPlayerResponse.Data();
                while (reader.pos < end) {
                    var tag = reader.uint32();
                    switch (tag >>> 3) {
                    case 1:
                        message.player = $root.proto.Player.decode(reader, reader.uint32());
                        break;
                    case 2:
                        message.Exist = reader.bool();
                        break;
                    default:
                        reader.skipType(tag & 7);
                        break;
                    }
                }
                return message;
            };

            /**
             * Decodes a Data message from the specified reader or buffer, length delimited.
             * @function decodeDelimited
             * @memberof proto.GetPlayerResponse.Data
             * @static
             * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
             * @returns {proto.GetPlayerResponse.Data} Data
             * @throws {Error} If the payload is not a reader or valid buffer
             * @throws {$protobuf.util.ProtocolError} If required fields are missing
             */
            Data.decodeDelimited = function decodeDelimited(reader) {
                if (!(reader instanceof $Reader))
                    reader = new $Reader(reader);
                return this.decode(reader, reader.uint32());
            };

            /**
             * Verifies a Data message.
             * @function verify
             * @memberof proto.GetPlayerResponse.Data
             * @static
             * @param {Object.<string,*>} message Plain object to verify
             * @returns {string|null} `null` if valid, otherwise the reason why it is not
             */
            Data.verify = function verify(message) {
                if (typeof message !== "object" || message === null)
                    return "object expected";
                if (message.player != null && message.hasOwnProperty("player")) {
                    var error = $root.proto.Player.verify(message.player);
                    if (error)
                        return "player." + error;
                }
                if (message.Exist != null && message.hasOwnProperty("Exist"))
                    if (typeof message.Exist !== "boolean")
                        return "Exist: boolean expected";
                return null;
            };

            /**
             * Creates a Data message from a plain object. Also converts values to their respective internal types.
             * @function fromObject
             * @memberof proto.GetPlayerResponse.Data
             * @static
             * @param {Object.<string,*>} object Plain object
             * @returns {proto.GetPlayerResponse.Data} Data
             */
            Data.fromObject = function fromObject(object) {
                if (object instanceof $root.proto.GetPlayerResponse.Data)
                    return object;
                var message = new $root.proto.GetPlayerResponse.Data();
                if (object.player != null) {
                    if (typeof object.player !== "object")
                        throw TypeError(".proto.GetPlayerResponse.Data.player: object expected");
                    message.player = $root.proto.Player.fromObject(object.player);
                }
                if (object.Exist != null)
                    message.Exist = Boolean(object.Exist);
                return message;
            };

            /**
             * Creates a plain object from a Data message. Also converts values to other types if specified.
             * @function toObject
             * @memberof proto.GetPlayerResponse.Data
             * @static
             * @param {proto.GetPlayerResponse.Data} message Data
             * @param {$protobuf.IConversionOptions} [options] Conversion options
             * @returns {Object.<string,*>} Plain object
             */
            Data.toObject = function toObject(message, options) {
                if (!options)
                    options = {};
                var object = {};
                if (options.defaults) {
                    object.player = null;
                    object.Exist = false;
                }
                if (message.player != null && message.hasOwnProperty("player"))
                    object.player = $root.proto.Player.toObject(message.player, options);
                if (message.Exist != null && message.hasOwnProperty("Exist"))
                    object.Exist = message.Exist;
                return object;
            };

            /**
             * Converts this Data to JSON.
             * @function toJSON
             * @memberof proto.GetPlayerResponse.Data
             * @instance
             * @returns {Object.<string,*>} JSON object
             */
            Data.prototype.toJSON = function toJSON() {
                return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
            };

            return Data;
        })();

        return GetPlayerResponse;
    })();

    proto.ReceivePlayerPush = (function() {

        /**
         * Properties of a ReceivePlayerPush.
         * @memberof proto
         * @interface IReceivePlayerPush
         * @property {proto.IPlayer|null} [player] ReceivePlayerPush player
         */

        /**
         * Constructs a new ReceivePlayerPush.
         * @memberof proto
         * @classdesc Represents a ReceivePlayerPush.
         * @implements IReceivePlayerPush
         * @constructor
         * @param {proto.IReceivePlayerPush=} [properties] Properties to set
         */
        function ReceivePlayerPush(properties) {
            if (properties)
                for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
                    if (properties[keys[i]] != null)
                        this[keys[i]] = properties[keys[i]];
        }

        /**
         * ReceivePlayerPush player.
         * @member {proto.IPlayer|null|undefined} player
         * @memberof proto.ReceivePlayerPush
         * @instance
         */
        ReceivePlayerPush.prototype.player = null;

        /**
         * Creates a new ReceivePlayerPush instance using the specified properties.
         * @function create
         * @memberof proto.ReceivePlayerPush
         * @static
         * @param {proto.IReceivePlayerPush=} [properties] Properties to set
         * @returns {proto.ReceivePlayerPush} ReceivePlayerPush instance
         */
        ReceivePlayerPush.create = function create(properties) {
            return new ReceivePlayerPush(properties);
        };

        /**
         * Encodes the specified ReceivePlayerPush message. Does not implicitly {@link proto.ReceivePlayerPush.verify|verify} messages.
         * @function encode
         * @memberof proto.ReceivePlayerPush
         * @static
         * @param {proto.IReceivePlayerPush} message ReceivePlayerPush message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ReceivePlayerPush.encode = function encode(message, writer) {
            if (!writer)
                writer = $Writer.create();
            if (message.player != null && Object.hasOwnProperty.call(message, "player"))
                $root.proto.Player.encode(message.player, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
            return writer;
        };

        /**
         * Encodes the specified ReceivePlayerPush message, length delimited. Does not implicitly {@link proto.ReceivePlayerPush.verify|verify} messages.
         * @function encodeDelimited
         * @memberof proto.ReceivePlayerPush
         * @static
         * @param {proto.IReceivePlayerPush} message ReceivePlayerPush message or plain object to encode
         * @param {$protobuf.Writer} [writer] Writer to encode to
         * @returns {$protobuf.Writer} Writer
         */
        ReceivePlayerPush.encodeDelimited = function encodeDelimited(message, writer) {
            return this.encode(message, writer).ldelim();
        };

        /**
         * Decodes a ReceivePlayerPush message from the specified reader or buffer.
         * @function decode
         * @memberof proto.ReceivePlayerPush
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @param {number} [length] Message length if known beforehand
         * @returns {proto.ReceivePlayerPush} ReceivePlayerPush
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ReceivePlayerPush.decode = function decode(reader, length) {
            if (!(reader instanceof $Reader))
                reader = $Reader.create(reader);
            var end = length === undefined ? reader.len : reader.pos + length, message = new $root.proto.ReceivePlayerPush();
            while (reader.pos < end) {
                var tag = reader.uint32();
                switch (tag >>> 3) {
                case 1:
                    message.player = $root.proto.Player.decode(reader, reader.uint32());
                    break;
                default:
                    reader.skipType(tag & 7);
                    break;
                }
            }
            return message;
        };

        /**
         * Decodes a ReceivePlayerPush message from the specified reader or buffer, length delimited.
         * @function decodeDelimited
         * @memberof proto.ReceivePlayerPush
         * @static
         * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
         * @returns {proto.ReceivePlayerPush} ReceivePlayerPush
         * @throws {Error} If the payload is not a reader or valid buffer
         * @throws {$protobuf.util.ProtocolError} If required fields are missing
         */
        ReceivePlayerPush.decodeDelimited = function decodeDelimited(reader) {
            if (!(reader instanceof $Reader))
                reader = new $Reader(reader);
            return this.decode(reader, reader.uint32());
        };

        /**
         * Verifies a ReceivePlayerPush message.
         * @function verify
         * @memberof proto.ReceivePlayerPush
         * @static
         * @param {Object.<string,*>} message Plain object to verify
         * @returns {string|null} `null` if valid, otherwise the reason why it is not
         */
        ReceivePlayerPush.verify = function verify(message) {
            if (typeof message !== "object" || message === null)
                return "object expected";
            if (message.player != null && message.hasOwnProperty("player")) {
                var error = $root.proto.Player.verify(message.player);
                if (error)
                    return "player." + error;
            }
            return null;
        };

        /**
         * Creates a ReceivePlayerPush message from a plain object. Also converts values to their respective internal types.
         * @function fromObject
         * @memberof proto.ReceivePlayerPush
         * @static
         * @param {Object.<string,*>} object Plain object
         * @returns {proto.ReceivePlayerPush} ReceivePlayerPush
         */
        ReceivePlayerPush.fromObject = function fromObject(object) {
            if (object instanceof $root.proto.ReceivePlayerPush)
                return object;
            var message = new $root.proto.ReceivePlayerPush();
            if (object.player != null) {
                if (typeof object.player !== "object")
                    throw TypeError(".proto.ReceivePlayerPush.player: object expected");
                message.player = $root.proto.Player.fromObject(object.player);
            }
            return message;
        };

        /**
         * Creates a plain object from a ReceivePlayerPush message. Also converts values to other types if specified.
         * @function toObject
         * @memberof proto.ReceivePlayerPush
         * @static
         * @param {proto.ReceivePlayerPush} message ReceivePlayerPush
         * @param {$protobuf.IConversionOptions} [options] Conversion options
         * @returns {Object.<string,*>} Plain object
         */
        ReceivePlayerPush.toObject = function toObject(message, options) {
            if (!options)
                options = {};
            var object = {};
            if (options.defaults)
                object.player = null;
            if (message.player != null && message.hasOwnProperty("player"))
                object.player = $root.proto.Player.toObject(message.player, options);
            return object;
        };

        /**
         * Converts this ReceivePlayerPush to JSON.
         * @function toJSON
         * @memberof proto.ReceivePlayerPush
         * @instance
         * @returns {Object.<string,*>} JSON object
         */
        ReceivePlayerPush.prototype.toJSON = function toJSON() {
            return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
        };

        return ReceivePlayerPush;
    })();

    return proto;
})();

module.exports = $root;
